<template>
  <el-button class="outer-button" @click="handleClick(params.name)">
    <div class="inner-title">{{params.title}}</div>
    <div>{{params.description}}</div>
    <div>更新时间：{{params.time}}，共{{params.count}}题</div>
  </el-button>
</template>

<script>
export default {
  name: "actionButton",
  props: ["params"],
  methods: {
    handleClick(name) {
      this.$router.push({
        path: "/action",
        query: {
          name: name,
        },
      });
    },
  },
};
</script>

<style scoped>
.outer-button {
  width: 100%;
  text-align: justify;
}
.inner-title {
  font-size: 1.5em;
  padding-bottom: 0.5em;
}
.inner-subtitle {
  color: gray;
}
.inner-description {
  color: gray;
}
</style>